home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Environments / Clean 1.2.4 / IOInterface / menuInternal.dcl < prev    next >
Encoding:
Modula Definition  |  1995-03-02  |  1.2 KB  |  38 lines  |  [TEXT/3PRM]

  1. definition module menuInternal;
  2.  
  3.  
  4. import    menus;
  5. import    ioState;
  6.  
  7.  
  8. AppleMenuId                :== 128;
  9. InsertPullDownPosition    :== 0;
  10. InsertSubPosition        :== -1;    
  11. SystemAble                :== True;
  12. SystemUnable            :== False;
  13.  
  14.  
  15. //    Initialization and Allocation:
  16.  
  17. AppleMenu                ::                                        !Toolbox -> (!MenuHandle s, !Toolbox);
  18. EmptyMenuHandle            ::                                !MenuId !Toolbox -> (!MenuHandle s, !Toolbox);
  19. NewMenuHandle            :: !(MenuDef     s (IOState s)) !MenuId !Toolbox -> (!MenuHandle s, !Toolbox);
  20. NewMenuElementHandle    :: !(MenuElement s (IOState s)) !MenuId !Toolbox -> (!MenuHandle s, !Toolbox);
  21. DisposeMenuSystemState    :: !(DeviceSystemState s)                !Toolbox -> Toolbox;
  22.  
  23. //    Forming the MenuBar:
  24.  
  25. Insert_menu                :: !(MenuHandle s)            !Toolbox -> Toolbox;
  26. GetMenuSystem            :: !(DeviceSystemState s)    !Toolbox -> (!DeviceSystemState s, !Toolbox);
  27. SetMenuSystem            :: !(DeviceSystemState s)    !Toolbox -> Toolbox;
  28.  
  29. //    Access-rules on MenuSystemStates:
  30.  
  31. MenuSystemState_MenuFunction    :: !MenuId !Int !(DeviceSystemState s)
  32.                                 -> (!Bool, !MenuFunction s (IOState s));
  33. SplitMenuHandle                    :: !(MenuHandle s) !Int -> (![MenuHandle s], !MenuHandle s);
  34.  
  35. //    CheckItemTitle checks for empty titles and for titles that begin with a '-'
  36.  
  37. CheckItemTitle                    :: !String -> String;
  38.